Skip to content

Don't register click when user moves away from Button before lifting finger#15

Merged
StevenDXC merged 2 commits intoStevenDXC:masterfrom
Seylox:master
Jan 6, 2018
Merged

Don't register click when user moves away from Button before lifting finger#15
StevenDXC merged 2 commits intoStevenDXC:masterfrom
Seylox:master

Conversation

@Seylox
Copy link
Contributor

@Seylox Seylox commented Nov 22, 2017

No description provided.

@Lissy93
Copy link
Contributor

Lissy93 commented Dec 17, 2017

+1 this PR. @StevenDXC any chance of a code review and merge?

@Seylox
Copy link
Contributor Author

Seylox commented Dec 17, 2017

@Lissy93 if you want to use it with the Changes of the PR you can use it as a dependency from my Repo using Jitpack.io: https://jitpack.io/#Seylox/dxloadingbutton

@leoFengCT
Copy link

Touch Event did not add ACTION_CANCEL. It is not work well if touch and then move

public boolean onTouchEvent(MotionEvent event) {
if(!isEnabled()){
return true;
}
Log.i("AAA","Action="+event.getAction()) ;
switch (event.getAction()){
case MotionEvent.ACTION_DOWN:
mTouchX = event.getX();
mTouchY = event.getY();
playRippleAnimation(true,false);
break;
case MotionEvent.ACTION_UP:
playRippleAnimation(false,false);
break;
case MotionEvent.ACTION_CANCEL:
playRippleAnimation(false,true);
break;
}

    return true;
}

@StevenDXC StevenDXC merged commit abb2deb into StevenDXC:master Jan 6, 2018
@StevenDXC
Copy link
Owner

thanks, has merged @Seylox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants